# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigQuery.V2.Model.HparamSearchSpaces do
  @moduledoc """
  Hyperparameter search spaces. These should be a subset of training_options.

  ## Attributes

  *   `activationFn` (*type:* `GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t`, *default:* `nil`) - Activation functions of neural network models.
  *   `batchSize` (*type:* `GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t`, *default:* `nil`) - Mini batch sample size.
  *   `boosterType` (*type:* `GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t`, *default:* `nil`) - Booster type for boosted tree models.
  *   `colsampleBylevel` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Subsample ratio of columns for each level for boosted tree models.
  *   `colsampleBynode` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Subsample ratio of columns for each node(split) for boosted tree models.
  *   `colsampleBytree` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Subsample ratio of columns when constructing each tree for boosted tree models.
  *   `dartNormalizeType` (*type:* `GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t`, *default:* `nil`) - Dart normalization type for boosted tree models.
  *   `dropout` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Dropout probability for dnn model training and boosted tree models using dart booster.
  *   `hiddenUnits` (*type:* `GoogleApi.BigQuery.V2.Model.IntArrayHparamSearchSpace.t`, *default:* `nil`) - Hidden units for neural network models.
  *   `l1Reg` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - L1 regularization coefficient.
  *   `l2Reg` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - L2 regularization coefficient.
  *   `learnRate` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Learning rate of training jobs.
  *   `maxTreeDepth` (*type:* `GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t`, *default:* `nil`) - Maximum depth of a tree for boosted tree models.
  *   `minSplitLoss` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Minimum split loss for boosted tree models.
  *   `minTreeChildWeight` (*type:* `GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t`, *default:* `nil`) - Minimum sum of instance weight needed in a child for boosted tree models.
  *   `numClusters` (*type:* `GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t`, *default:* `nil`) - Number of clusters for k-means.
  *   `numFactors` (*type:* `GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t`, *default:* `nil`) - Number of latent factors to train on.
  *   `numParallelTree` (*type:* `GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t`, *default:* `nil`) - Number of parallel trees for boosted tree models.
  *   `optimizer` (*type:* `GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t`, *default:* `nil`) - Optimizer of TF models.
  *   `subsample` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Subsample the training data to grow tree to prevent overfitting for boosted tree models.
  *   `treeMethod` (*type:* `GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t`, *default:* `nil`) - Tree construction algorithm for boosted tree models.
  *   `walsAlpha` (*type:* `GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t`, *default:* `nil`) - Hyperparameter for matrix factoration when implicit feedback type is specified.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activationFn => GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t() | nil,
          :batchSize => GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t() | nil,
          :boosterType => GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t() | nil,
          :colsampleBylevel => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :colsampleBynode => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :colsampleBytree => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :dartNormalizeType => GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t() | nil,
          :dropout => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :hiddenUnits => GoogleApi.BigQuery.V2.Model.IntArrayHparamSearchSpace.t() | nil,
          :l1Reg => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :l2Reg => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :learnRate => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :maxTreeDepth => GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t() | nil,
          :minSplitLoss => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :minTreeChildWeight => GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t() | nil,
          :numClusters => GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t() | nil,
          :numFactors => GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t() | nil,
          :numParallelTree => GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace.t() | nil,
          :optimizer => GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t() | nil,
          :subsample => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil,
          :treeMethod => GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace.t() | nil,
          :walsAlpha => GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace.t() | nil
        }

  field(:activationFn, as: GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace)
  field(:batchSize, as: GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace)
  field(:boosterType, as: GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace)
  field(:colsampleBylevel, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:colsampleBynode, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:colsampleBytree, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:dartNormalizeType, as: GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace)
  field(:dropout, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:hiddenUnits, as: GoogleApi.BigQuery.V2.Model.IntArrayHparamSearchSpace)
  field(:l1Reg, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:l2Reg, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:learnRate, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:maxTreeDepth, as: GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace)
  field(:minSplitLoss, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:minTreeChildWeight, as: GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace)
  field(:numClusters, as: GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace)
  field(:numFactors, as: GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace)
  field(:numParallelTree, as: GoogleApi.BigQuery.V2.Model.IntHparamSearchSpace)
  field(:optimizer, as: GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace)
  field(:subsample, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
  field(:treeMethod, as: GoogleApi.BigQuery.V2.Model.StringHparamSearchSpace)
  field(:walsAlpha, as: GoogleApi.BigQuery.V2.Model.DoubleHparamSearchSpace)
end

defimpl Poison.Decoder, for: GoogleApi.BigQuery.V2.Model.HparamSearchSpaces do
  def decode(value, options) do
    GoogleApi.BigQuery.V2.Model.HparamSearchSpaces.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigQuery.V2.Model.HparamSearchSpaces do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
